package com.hyk.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hyk.domain.SysRole;
import com.hyk.mapper.SysRoleMapper;
import com.hyk.service.SysRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService{

    @Resource
    private SysRoleMapper sysRoleMapper;

    @Override
    public Page<SysRole> pageList(Page<SysRole> page, String name) {

        return sysRoleMapper.selectPageByName(page,name);
    }

    @Override
    public List<SysRole> findUserRole(Long userId) {

        return sysRoleMapper.selectUserRole(userId);
    }
}
